package com.dc.project_kotlin.ui.fragment

import android.view.View
import com.dc.base.vm.BaseViewModel
import com.dc.project_kotlin.R
import com.dc.project_kotlin.base.BaseFragment
import com.dc.project_kotlin.databinding.FragmentMainBinding
import com.dc.project_kotlin.ext.init
import com.dc.project_kotlin.ext.initMain

class MainFragment: BaseFragment<BaseViewModel, FragmentMainBinding>() {

    override fun initView(view: View) {
        mViewBinding.mainViewpager.initMain(this)
        mViewBinding.mainBottom.init {
            when(it) {
                R.id.menu_main -> mViewBinding.mainViewpager.setCurrentItem(0, false)
                R.id.menu_project -> mViewBinding.mainViewpager.setCurrentItem(1, false)
                R.id.menu_system -> mViewBinding.mainViewpager.setCurrentItem(2, false)
                R.id.menu_public -> mViewBinding.mainViewpager.setCurrentItem(3, false)
                R.id.menu_me -> mViewBinding.mainViewpager.setCurrentItem(4, false)
            }
        }
    }

    override fun initData() {

    }
}